<?php
include("../shared/config.php");
include("../shared/lan.php");

$name= $_POST["username"];
$pw= $_POST["password"];
$type= $_POST["type"];  
$sql="SELECT * from user where user_name = '$name'";
$search = mysqli_query($conn,$sql);
$count=mysqli_num_rows($search);
if(($name=="") || ($pw == "")){
echo "<a href='../page/zhuce.php'>".$label9."</a>";
exit();
}
if ($count>0)
{
	echo "<a href='../page/zhuce.php'>".$label10."</a>";
}
else
{
$sql = "INSERT INTO `LORM`.`user`(user_name,password,type) VALUES('{$name}','{$pw}','{$type}')";
$insert = mysqli_query($conn,$sql);  
mysqli_close($conn);
Header("Location:../page/login.php");
}
?>
 